<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="lib/bootstrap-3.3.7-dist/css/bootstrap.css">
    <style>
    </style>
</head>

<body>
    <div class="container">
        <form role="form">
            <div class="form-group">
                <label for="">用户名</label>
                <input type="text" class="form-control">
            </div>
            <div class="form-group">
                <label for="">密码</label>
                <input type="text" class="form-control">
            </div>
            <div class="checkbox">
                <label for="">
                    <input type="checkbox">记住密码
                </label>
            </div>
            <button type="submit" class="btn btn-success">提交</button>
        </form>
    </div>
    <h3>水平表单</h3>
    <div class="container">

        <form action="" role="form" class="form-horizontal">
            <div class="form-group">
                <label for="" class="col-xs-2">用户名</label>
                <div class="col-xs-10">
                    <input type="text" class="form-control ">
                </div>

            </div>
            <div class="form-group">
                <label for="" class="col-xs-2">密码</label>
                <div class="col-xs-10">
                    <input type="text" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <div class="checkbox col-xs-10 col-xs-offset-2">
                    <label for="">
                        <input type="checkbox">记住密码
                    </label>
                </div>
            </div>
            <div class="form-group">
                <div class="col-xs-10 col-xs-offset-2">
                    <button type="submit" class="btn btn-default">提交</button>
                </div>
            </div>
        </form>
    </div>
    <h4>内联表单</h4>
    <div class="container">
        <form class="form-inline" role="form">
            <div class="form-group">
                <label class="sr-only" for="exampleInputEmail2">邮箱</label>
                <input type="email" class="form-control" id="exampleInputEmail2" placeholder="请输入你的邮箱地址">
            </div>
            <div class="form-group">
                <label class="sr-only" for="exampleInputPassword2">密码</label>
                <input type="password" class="form-control" id="exampleInputPassword2" placeholder="请输入你的邮箱密码">
            </div>
            <div class="checkbox">
                <label>
                    <input type="checkbox"> 记住密码
                </label>
            </div>
            <button type="submit" class="btn btn-default">进入邮箱</button>
        </form>
    </div>
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="lib/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
</body>

</html>